3.4.64 \(\int \frac {(f+g x^{-2 n}) \log (c (d+e x^n)^p)}{x} \, dx\) [364]

Optimal. Leaf size=126 \[ -\frac {e g p x^{-n}}{2 d n}-\frac {e^2 g p \log (x)}{2 d^2}+\frac {e^2 g p \log \left (d+e x^n\right )}{2 d^2 n}-\frac {g x^{-2 n} \log \left (c \left (d+e x^n\right )^p\right )}{2 n}+\frac {f \log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{n}+\frac {f p \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{n} \]

[Out]

-1/2*e*g*p/d/n/(x^n)-1/2*e^2*g*p*ln(x)/d^2+1/2*e^2*g*p*ln(d+e*x^n)/d^2/n-1/2*g*ln(c*(d+e*x^n)^p)/n/(x^(2*n))+f
*ln(-e*x^n/d)*ln(c*(d+e*x^n)^p)/n+f*p*polylog(2,1+e*x^n/d)/n

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {2525, 14, 2463, 2442, 46, 2441, 2352} \begin {gather*} \frac {f p \text {PolyLog}\left (2,\frac {e x^n}{d}+1\right )}{n}+\frac {f \log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{n}-\frac {g x^{-2 n} \log \left (c \left (d+e x^n\right )^p\right )}{2 n}+\frac {e^2 g p \log \left (d+e x^n\right )}{2 d^2 n}-\frac {e^2 g p \log (x)}{2 d^2}-\frac {e g p x^{-n}}{2 d n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((f + g/x^(2*n))*Log[c*(d + e*x^n)^p])/x,x]

[Out]

-1/2*(e*g*p)/(d*n*x^n) - (e^2*g*p*Log[x])/(2*d^2) + (e^2*g*p*Log[d + e*x^n])/(2*d^2*n) - (g*Log[c*(d + e*x^n)^
p])/(2*n*x^(2*n)) + (f*Log[-((e*x^n)/d)]*Log[c*(d + e*x^n)^p])/n + (f*p*PolyLog[2, 1 + (e*x^n)/d])/n

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2441

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((f + g
*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])/g), x] - Dist[b*e*(n/g), Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2463

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rule 2525

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rubi steps

\begin {align*} \int \frac {\left (f+g x^{-2 n}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{x} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (f+\frac {g}{x^2}\right ) \log \left (c (d+e x)^p\right )}{x} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (\frac {g \log \left (c (d+e x)^p\right )}{x^3}+\frac {f \log \left (c (d+e x)^p\right )}{x}\right ) \, dx,x,x^n\right )}{n}\\ &=\frac {f \text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{x} \, dx,x,x^n\right )}{n}+\frac {g \text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{x^3} \, dx,x,x^n\right )}{n}\\ &=-\frac {g x^{-2 n} \log \left (c \left (d+e x^n\right )^p\right )}{2 n}+\frac {f \log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{n}-\frac {(e f p) \text {Subst}\left (\int \frac {\log \left (-\frac {e x}{d}\right )}{d+e x} \, dx,x,x^n\right )}{n}+\frac {(e g p) \text {Subst}\left (\int \frac {1}{x^2 (d+e x)} \, dx,x,x^n\right )}{2 n}\\ &=-\frac {g x^{-2 n} \log \left (c \left (d+e x^n\right )^p\right )}{2 n}+\frac {f \log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{n}+\frac {f p \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{n}+\frac {(e g p) \text {Subst}\left (\int \left (\frac {1}{d x^2}-\frac {e}{d^2 x}+\frac {e^2}{d^2 (d+e x)}\right ) \, dx,x,x^n\right )}{2 n}\\ &=-\frac {e g p x^{-n}}{2 d n}-\frac {e^2 g p \log (x)}{2 d^2}+\frac {e^2 g p \log \left (d+e x^n\right )}{2 d^2 n}-\frac {g x^{-2 n} \log \left (c \left (d+e x^n\right )^p\right )}{2 n}+\frac {f \log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{n}+\frac {f p \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.30, size = 148, normalized size = 1.17 \begin {gather*} -\frac {d e g p x^{-n}-2 d^2 f p \log \left (-\frac {e x^n}{d}\right ) \log \left (d+e x^n\right )-e^2 g p \log \left (n \left (d+e x^n\right )\right )+d^2 g x^{-2 n} \log \left (c \left (d+e x^n\right )^p\right )+n \log (x) \left (e^2 g p+2 d^2 f p \log \left (d+e x^n\right )-2 d^2 f \log \left (c \left (d+e x^n\right )^p\right )\right )-2 d^2 f p \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{2 d^2 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((f + g/x^(2*n))*Log[c*(d + e*x^n)^p])/x,x]

[Out]

-1/2*((d*e*g*p)/x^n - 2*d^2*f*p*Log[-((e*x^n)/d)]*Log[d + e*x^n] - e^2*g*p*Log[n*(d + e*x^n)] + (d^2*g*Log[c*(
d + e*x^n)^p])/x^(2*n) + n*Log[x]*(e^2*g*p + 2*d^2*f*p*Log[d + e*x^n] - 2*d^2*f*Log[c*(d + e*x^n)^p]) - 2*d^2*
f*p*PolyLog[2, 1 + (e*x^n)/d])/(d^2*n)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.09, size = 448, normalized size = 3.56

method result size
risch \(\frac {\left (2 f \ln \left (x \right ) n \,x^{2 n}-g \right ) x^{-2 n} \ln \left (\left (d +e \,x^{n}\right )^{p}\right )}{2 n}+\frac {i \pi \,\mathrm {csgn}\left (i \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \right ) g \,x^{-2 n}}{4 n}-\frac {i \pi \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{3} f \ln \left (x^{n}\right )}{2 n}-\frac {i \pi \,\mathrm {csgn}\left (i \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{2} g \,x^{-2 n}}{4 n}-\frac {i \pi \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right ) g \,x^{-2 n}}{4 n}+\frac {i \pi \,\mathrm {csgn}\left (i \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{2} f \ln \left (x^{n}\right )}{2 n}-\frac {i \pi \,\mathrm {csgn}\left (i \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \right ) f \ln \left (x^{n}\right )}{2 n}+\frac {i \pi \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{3} g \,x^{-2 n}}{4 n}+\frac {i \pi \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right ) f \ln \left (x^{n}\right )}{2 n}+\frac {\ln \left (c \right ) f \ln \left (x^{n}\right )}{n}-\frac {\ln \left (c \right ) g \,x^{-2 n}}{2 n}+\frac {e^{2} g p \ln \left (d +e \,x^{n}\right )}{2 d^{2} n}-\frac {e g p \,x^{-n}}{2 d n}-\frac {p \,e^{2} g \ln \left (x^{n}\right )}{2 n \,d^{2}}-\frac {p f \dilog \left (\frac {d +e \,x^{n}}{d}\right )}{n}-p f \ln \left (x \right ) \ln \left (\frac {d +e \,x^{n}}{d}\right )\) \(448\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f+g/(x^(2*n)))*ln(c*(d+e*x^n)^p)/x,x,method=_RETURNVERBOSE)

[Out]

1/2*(2*f*ln(x)*n*(x^n)^2-g)/n/(x^n)^2*ln((d+e*x^n)^p)+1/4*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^3*g/(x^n)^2-1/2*I/n*Pi*
csgn(I*c*(d+e*x^n)^p)^3*f*ln(x^n)-1/4*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)^2*g/(x^n)^2+1/2*I/n*Pi*
csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)^2*f*ln(x^n)-1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)*csg
n(I*c)*f*ln(x^n)+1/4*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)*csgn(I*c)*g/(x^n)^2+1/2*I/n*Pi*csgn(I*c*
(d+e*x^n)^p)^2*csgn(I*c)*f*ln(x^n)-1/4*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^2*csgn(I*c)*g/(x^n)^2+1/n*ln(c)*f*ln(x^n)-
1/2/n*ln(c)*g/(x^n)^2+1/2*e^2*g*p*ln(d+e*x^n)/d^2/n-1/2*e*g*p/d/n/(x^n)-1/2*p*e^2/n*g/d^2*ln(x^n)-p/n*f*dilog(
(d+e*x^n)/d)-p*f*ln(x)*ln((d+e*x^n)/d)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f+g/(x^(2*n)))*log(c*(d+e*x^n)^p)/x,x, algorithm="maxima")

[Out]

-1/2*(g*p*e^(n*log(x) + 1) + d*g*log(c) + (d*f*n^2*p*log(x)^2 - 2*d*f*n*log(c)*log(x))*x^(2*n) - (2*d*f*n*x^(2
*n)*log(x) - d*g)*log((d + e^(n*log(x) + 1))^p))/(d*n*x^(2*n)) + integrate(1/2*(2*d^2*f*n*p*log(x) - g*p*e^2)/
(d^2*x + d*x*e^(n*log(x) + 1)), x)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 154, normalized size = 1.22 \begin {gather*} -\frac {2 \, d^{2} f n p x^{2 \, n} \log \left (x\right ) \log \left (\frac {x^{n} e + d}{d}\right ) + 2 \, d^{2} f p x^{2 \, n} {\rm Li}_2\left (-\frac {x^{n} e + d}{d} + 1\right ) + d g p x^{n} e + d^{2} g \log \left (c\right ) - {\left (2 \, d^{2} f n \log \left (c\right ) - g n p e^{2}\right )} x^{2 \, n} \log \left (x\right ) + {\left (d^{2} g p - {\left (2 \, d^{2} f n p \log \left (x\right ) + g p e^{2}\right )} x^{2 \, n}\right )} \log \left (x^{n} e + d\right )}{2 \, d^{2} n x^{2 \, n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f+g/(x^(2*n)))*log(c*(d+e*x^n)^p)/x,x, algorithm="fricas")

[Out]

-1/2*(2*d^2*f*n*p*x^(2*n)*log(x)*log((x^n*e + d)/d) + 2*d^2*f*p*x^(2*n)*dilog(-(x^n*e + d)/d + 1) + d*g*p*x^n*
e + d^2*g*log(c) - (2*d^2*f*n*log(c) - g*n*p*e^2)*x^(2*n)*log(x) + (d^2*g*p - (2*d^2*f*n*p*log(x) + g*p*e^2)*x
^(2*n))*log(x^n*e + d))/(d^2*n*x^(2*n))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{- 2 n} \left (f x^{2 n} + g\right ) \log {\left (c \left (d + e x^{n}\right )^{p} \right )}}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f+g/(x**(2*n)))*ln(c*(d+e*x**n)**p)/x,x)

[Out]

Integral((f*x**(2*n) + g)*log(c*(d + e*x**n)**p)/(x*x**(2*n)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f+g/(x^(2*n)))*log(c*(d+e*x^n)^p)/x,x, algorithm="giac")

[Out]

integrate((f + g/x^(2*n))*log((x^n*e + d)^p*c)/x, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (c\,{\left (d+e\,x^n\right )}^p\right )\,\left (f+\frac {g}{x^{2\,n}}\right )}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(c*(d + e*x^n)^p)*(f + g/x^(2*n)))/x,x)

[Out]

int((log(c*(d + e*x^n)^p)*(f + g/x^(2*n)))/x, x)

________________________________________________________________________________________